com.supermap.ar.areffect.preset
Class FlowElement
- java.lang.Object
-
- com.supermap.ar.areffect.preset.FlowElement
-
public class FlowElement extends java.lang.ObjectFlow element The resource is a gltf model
-
-
Constructor Summary
Constructors Constructor and Description FlowElement()The constructorFlowElement(java.lang.String id)The constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclear()ARAnimationGroupgenerateAnimation(AREffectElement e)Generate animationARAnimationGroupgenerateAnimation(int resourceId)Generate flow elements based on the model's resource ID Note: Uniform cycle (or uniform speed) should be set before using this method.java.lang.StringgetAnimationGroupName()Gets the animation group name (actually the animation ID)java.util.List<AREffectElement>getElementList()Gets all elements of the class objectjava.util.List<Location>getLocations()get geographic locationAREffectElementgetParentElement()Get the parent nodejava.util.List<Point3D>getPoints()get ARcoordinate pointsintgetRepeatCount()Gets the number of cycles of the animation When -1, the animation loops indefinitelyjava.lang.FloatgetSpacingDistance()get Distance retur nnulljava.lang.LonggetUnifiedDuration()get the uniform cyclefloatgetUnifiedSpeed()get the uniform speed, m/svoidinitModelAnimation()Load the model's own animation To be asynchronous Model Renderable is null,throw NullPointerExceptionvoidsetLocations(java.util.List<Location> locations)set geographic locationvoidsetLocations(Location a, Location b, float spacingDistance)set the position and spacing of two point Generate particles according to spacingDistance between two point of abvoidsetParentNode(AREffectElement element)Setting the parent nodevoidsetParentNode(EffectView arEffectView)Setting the parent nodevoidsetPoints(java.util.List<Point3D> points)set ARcoordinate pointsvoidsetPoints(Point3D a, Point3D b, float spacingDistance)set the position and spacing of two point Generate particles according to spacingDistance between two point of abvoidsetRepeatCount(int repeatCount)Sets the number of cycles for the animation If the value is less than 0, go to -1 -1, the animation loop is infinitevoidsetRotationAngle(Vector v, float angle)Set rotation posturevoidsetRotationDirection(boolean b)The rotation direction true,clockwise false,counterclockwisevoidsetScaleFactor(float[] scaleFactor)Set the proportionvoidsetScaleFactor(float x, float y, float z)Set the proportionvoidsetUnifiedDuration(long duration)set the uniform cycle m/svoidsetUnifiedSpeed(float speed)set the uniform speed m/s
-
-
-
Constructor Detail
-
FlowElement
public FlowElement()
The constructor
-
FlowElement
public FlowElement(java.lang.String id)
The constructor- Parameters:
id-
-
-
Method Detail
-
setParentNode
public void setParentNode(AREffectElement element)
Setting the parent node
-
setParentNode
public void setParentNode(EffectView arEffectView)
Setting the parent node
-
getSpacingDistance
public java.lang.Float getSpacingDistance()
get Distance retur nnull- Returns:
-
setPoints
public void setPoints(Point3D a, Point3D b, float spacingDistance)
set the position and spacing of two point Generate particles according to spacingDistance between two point of ab- Parameters:
a-b-spacingDistance-
-
setLocations
public void setLocations(Location a, Location b, float spacingDistance)
set the position and spacing of two point Generate particles according to spacingDistance between two point of ab- Parameters:
a-b-spacingDistance-
-
getLocations
public java.util.List<Location> getLocations()
get geographic location- Returns:
-
setLocations
public void setLocations(java.util.List<Location> locations)
set geographic location- Parameters:
locations-
-
getPoints
public java.util.List<Point3D> getPoints()
get ARcoordinate points- Returns:
-
setPoints
public void setPoints(java.util.List<Point3D> points)
set ARcoordinate points- Parameters:
points-
-
setUnifiedSpeed
public void setUnifiedSpeed(float speed)
set the uniform speed m/s- Parameters:
speed-
-
getUnifiedSpeed
public float getUnifiedSpeed()
get the uniform speed, m/s- Returns:
-
setUnifiedDuration
public void setUnifiedDuration(long duration)
set the uniform cycle m/s- Parameters:
duration-
-
getUnifiedDuration
public java.lang.Long getUnifiedDuration()
get the uniform cycle- Returns:
-
getRepeatCount
public int getRepeatCount()
Gets the number of cycles of the animation When -1, the animation loops indefinitely- Returns:
-
setRepeatCount
public void setRepeatCount(int repeatCount)
Sets the number of cycles for the animation If the value is less than 0, go to -1 -1, the animation loop is infinite- Parameters:
repeatCount-
-
setRotationAngle
public void setRotationAngle(Vector v, float angle)
Set rotation posture- Parameters:
v- The axis of rotationangle- Rotation Angle
-
setScaleFactor
public void setScaleFactor(float x, float y, float z)Set the proportion- Parameters:
x- X Axial scalingy- Y Axial scalingz- Z Axial scaling
-
getAnimationGroupName
public java.lang.String getAnimationGroupName()
Gets the animation group name (actually the animation ID)- Returns:
-
getElementList
public java.util.List<AREffectElement> getElementList()
Gets all elements of the class object- Returns:
-
generateAnimation
public ARAnimationGroup generateAnimation(int resourceId)
Generate flow elements based on the model's resource ID Note: Uniform cycle (or uniform speed) should be set before using this method.- Parameters:
resourceId- Model resource ID- Returns:
-
generateAnimation
public ARAnimationGroup generateAnimation(AREffectElement e)
Generate animation- Parameters:
e-- Returns:
-
initModelAnimation
public void initModelAnimation()
Load the model's own animation To be asynchronous Model Renderable is null,throw NullPointerException
-
setRotationDirection
public void setRotationDirection(boolean b)
The rotation direction true,clockwise false,counterclockwise- Parameters:
b-
-
clear
public void clear()
-
setScaleFactor
public void setScaleFactor(float[] scaleFactor)
Set the proportion- Parameters:
scaleFactor- Xyz scale
-
getParentElement
public AREffectElement getParentElement()
Get the parent node- Returns:
-
-